<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>专业数据处理平台</title>
    <meta name="description" content="这是一个 workUpdate 页面">
    <meta name="keywords" content="workUpdate">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="${ctx}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${ctx}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="${ctx}/assets/css/bootstrap.css">
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="${ctx}/assets/css/admin.css">
    <link rel="stylesheet" href="${ctx}/assets/css/app.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/xcConfirm.css"/>
</head>

<body data-type="chart">

        <!--标题-->
        <div class="tpl-content-page-title">
            工作流系统--作业
        </div>
        <!--面包屑-->
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">调度</a></li>
            <li class="am-active">调度作业修改</li>
        </ol>

        <div class="tpl-portlet-components">

            <div class="tpl-portlet-components">

                <div class="portlet-title">
                    <div class="caption font-green bold">
                        调度作业修改
                    </div>
                </div>

                <div class="am-tabs tpl-index-tabs" data-am-tabs="{noSwipe: 1}">

                    <ul class="am-tabs-nav am-nav am-nav-tabs">
                        <li class="am-active"><a href="#tab1">基本信息</a></li>
                        <li><a href="#tab2">详细信息</a></li>
                        <li><a href="#tab3" onclick="checkInfo()">详情预览</a></li>
                    </ul>

                    <div class="am-tabs-bd">
                        <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                            <div class="tpl-portlet-components">
                                <div class="portlet-title">
                                    <div class="caption font-green">
                                        作业基本信息
                                    </div>
                                </div>
                                <div class="am-g tpl-amazeui-form">
                                    <div class="am-u-sm-12">
                                        <form class="am-form am-form-horizontal">
                                            <div class="am-form-group">
                                                <label for="name" class="am-u-sm-3 am-form-label">作业名称</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="name" placeholder="作业名称"/>
                                                </div>
                                                <p id="check_name_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="command" class="am-u-sm-3 am-form-label">执行命令</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="command" placeholder="请输入作业的执行命令">
                                                </div>
                                                <p id="check_command_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group am-form-file">
                                                <label for="file" class="am-u-sm-3 am-form-label">依赖文件上传</label>
                                                <div class="am-u-sm-6">
                                                    <button type="button" class="am-btn am-btn-default am-btn-sm">
                                                        <i class="am-icon-cloud-upload"></i> 选择要上传的文件
                                                    </button>
                                                    <input style="width: 160.83px; height: 100%; left: 1.5rem!important; " type="file" id="file" onchange="fileShowMess(this)">
                                                </div>
                                                <p id="check_file_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                                <label class="am-u-sm-6" id="fileShow_div"
                                                       style="font-weight: 500;"></label>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="scheduling_strategy"
                                                       class="am-u-sm-3 am-form-label">调度策略选择</label>
                                                <div class="am-u-sm-6 am-form">
                                                    <select id="scheduling_strategy">
                                                        <option value="" disabled="disabled" selected="selected">
                                                            -请选择调度策略
                                                        </option>
                                                        <option value="cpu可利用率最大">cpu可利用率最大</option>
                                                        <option value="cpu可利用率最小">cpu可利用率最小</option>
                                                        <option value="内存剩余最大">内存剩余最大</option>
                                                        <option value="内存剩余最小">内存剩余最小</option>
                                                    </select>
                                                </div>
                                                <p id="check_scheduling_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                                <span class="am-form-caret"></span>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="priority" class="am-u-sm-3 am-form-label">作业优先级</label>
                                                <div class="am-u-sm-6">
                                                    <input type="number" min="1" max="100" id="priority" placeholder="作业优先级 1-100(100最高)"/>
                                                </div>
                                                <p id="check_priority_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="job_queue"
                                                       class="am-u-sm-3 am-form-label">作业队列选择</label>
                                                <div class="am-u-sm-6 am-form">
                                                    <select id="job_queue" class="am-u-sm-6">
                                                        <option value="" disabled="disabled" selected="selected">
                                                            -请选择作业队列
                                                        </option>
                                                    </select>
                                                </div>
                                                <p id="check_jobqueue_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                                <span class="am-form-caret"></span>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="node_group"
                                                       class="am-u-sm-3 am-form-label">节点分组选择</label>
                                                <div class="am-u-sm-6 am-form">
                                                    <select id="node_group" class="am-u-sm-6">
                                                        <option value="" disabled="disabled" selected="selected">
                                                            -请选择节点分组
                                                        </option>
                                                    </select>
                                                </div>
                                                <p id="check_nodegroup_div" class="am-u-sm-3" style="margin-top: 5px;"></p>
                                                <span class="am-form-caret"></span>
                                            </div>

                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="am-tab-panel am-fade" id="tab2">
                            <div class="tpl-portlet-components">
                                <div class="portlet-title">
                                    <div class="caption font-green">
                                        详细信息
                                    </div>
                                </div>
                                <div class="am-g tpl-amazeui-form">
                                    <div class="am-u-sm-12">
                                        <form class="am-form am-form-horizontal">
                                            <div class="am-form-group" id="memorynum_div">
                                                <label for="memorynum" class="am-u-sm-3 am-form-label">内存使用量</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="memorynum" placeholder="内存使用量"/>
                                                </div>
                                                <p  class="am-u-sm-3" id="check_memorynum_div" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group" id="cpunum_div">
                                                <label for="cpunum" class="am-u-sm-3 am-form-label">所需CPU核数</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="cpunum" placeholder="所需CPU核数"/>
                                                </div>
                                                <p  class="am-u-sm-3" id="check_cpunum_div" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="is_use_gpu" class="am-u-sm-3 am-form-label">是否使用GPU</label>
                                                <div class="am-u-sm-3" id="isUseGPU">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="is_use_gpu" value="true" name="GPU">是
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="no_gpu" value="false" name="GPU">否
                                                    </label>
                                                </div>
                                                <p id="GPU_div" class="am-u-sm-6" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group">
                                                <label for="is_use_mpi" class="am-u-sm-3 am-form-label">是否为MPI</label>
                                                <div class="am-u-sm-3">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="is_use_mpi" value="true" name="MPI">是
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="no_mpi" value="false" name="MPI">否
                                                    </label>
                                                </div>
                                                <p id="MPI_div" class="am-u-sm-6" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group" id="mpinum_div" style="display: none">
                                                <label for="mpinum" class="am-u-sm-3 am-form-label">MPI进程数</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="mpinum" placeholder="MPI进程数"/>
                                                </div>
                                                <p  class="am-u-sm-3" id="check_mpinum_div" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group">
                                                <label class="am-u-sm-3 am-form-label">作业类型</label>
                                                <div class="am-u-sm-3">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="realTime" value="realTime" name="work_style">实时作业
                                                    </label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" id="definiteTime" value="definiteTime" name="work_style">定时作业
                                                    </label>
                                                </div>
                                                <p id="isLEft_div" class="am-u-sm-6" style="margin-top: 5px;"></p>
                                            </div>

                                            <div class="am-form-group" id="time_div">
                                                <label for="time" class="am-u-sm-3 am-form-label">作业运行时间段</label>
                                                <div class="am-u-sm-6">
                                                    <input type="text" id="time" placeholder="作业运行时间段"/>
                                                </div>
                                                <p  class="am-u-sm-3" id="check_time_div" style="margin-top: 5px;"></p>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="am-tab-panel am-fade" id="tab3">
                            <div class="tpl-portlet-components">
                                <div class="portlet-title">
                                    <div class="caption font-green">
                                        详情预览
                                    </div>
                                    <div class="action" style="float: right;">
                                        <ul class="actions-btn">
                                            <li class="blue" onclick="submit()">保存</li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="am-g tpl-amazeui-form">
                                    <div class="am-u-sm-12 am-u-md-12" id="deleteLable">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<script src="${ctx}/assets/js/jQuery/jquery-1.9.1.js"></script>
<script src="${ctx}/assets/js/jQuery/jquery.min.js"></script>
<script src="${ctx}/assets/js/common/amazeui.min.js"></script>
<script src="${ctx}/assets/js/common/xcConfirm.js"></script>
<script src="${ctx}/assets/js/common/config.js"></script>
<script src="${ctx}/assets/js/common/app.js"></script>
<script src="${ctx}/assets/js/layer/layer.js"></script>
<script src="${ctx}/assets/js/job/jobRegister.js"></script>
</body>

</html>